﻿using ServiceContrack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace Services
{
    class TestCase
    {
        static void Main(string[] args)
        {
            using (ServiceHost host = new ServiceHost(typeof(CalculatorServices)))
            {
                // HTTP方式

                WSDualHttpBinding httpBinding = new WSDualHttpBinding();
                host.AddServiceEndpoint(typeof(ICalculatorDuplex), httpBinding, "http://localhost:8900/");  

                host.Open();
                Console.WriteLine("服务已启动。"); 
                Console.ReadKey();
            }
        }
    }
}
